﻿using System;
using System.Collections.Generic;
using System.Linq;
using TaleWorlds.CampaignSystem.Actions;
using TaleWorlds.CampaignSystem.ComponentInterfaces;
using TaleWorlds.CampaignSystem.Encounters;
using TaleWorlds.CampaignSystem.GameMenus;
using TaleWorlds.CampaignSystem.MapEvents;
using TaleWorlds.CampaignSystem.Party;
using TaleWorlds.CampaignSystem.Settlements;
using TaleWorlds.Core;
using TaleWorlds.Library;
using TaleWorlds.SaveSystem;

namespace TaleWorlds.CampaignSystem.Siege
{
	// Token: 0x02000280 RID: 640
	public class SiegeEvent
	{
		// Token: 0x0600223A RID: 8762 RVA: 0x000915B8 File Offset: 0x0008F7B8
		internal static void AutoGeneratedStaticCollectObjectsSiegeEvent(object o, List<object> collectedObjects)
		{
			((SiegeEvent)o).AutoGeneratedInstanceCollectObjects(collectedObjects);
		}

		// Token: 0x0600223B RID: 8763 RVA: 0x000915C6 File Offset: 0x0008F7C6
		protected virtual void AutoGeneratedInstanceCollectObjects(List<object> collectedObjects)
		{
			collectedObjects.Add(this.BesiegedSettlement);
			collectedObjects.Add(this.BesiegerCamp);
			CampaignTime.AutoGeneratedStaticCollectObjectsCampaignTime(this.SiegeStartTime, collectedObjects);
		}

		// Token: 0x0600223C RID: 8764 RVA: 0x000915F1 File Offset: 0x0008F7F1
		internal static object AutoGeneratedGetMemberValueSiegeStartTime(object o)
		{
			return ((SiegeEvent)o).SiegeStartTime;
		}

		// Token: 0x0600223D RID: 8765 RVA: 0x00091603 File Offset: 0x0008F803
		internal static object AutoGeneratedGetMemberValueBesiegedSettlement(object o)
		{
			return ((SiegeEvent)o).BesiegedSettlement;
		}

		// Token: 0x0600223E RID: 8766 RVA: 0x00091610 File Offset: 0x0008F810
		internal static object AutoGeneratedGetMemberValueBesiegerCamp(object o)
		{
			return ((SiegeEvent)o).BesiegerCamp;
		}

		// Token: 0x0600223F RID: 8767 RVA: 0x0009161D File Offset: 0x0008F81D
		internal static object AutoGeneratedGetMemberValue_isBesiegerDefeated(object o)
		{
			return ((SiegeEvent)o)._isBesiegerDefeated;
		}

		// Token: 0x17000894 RID: 2196
		// (get) Token: 0x06002240 RID: 8768 RVA: 0x00091630 File Offset: 0x0008F830
		public int SiegeWallSeed
		{
			get
			{
				return Common.GetDJB2("" + this.SiegeStartTime.NumTicks + "*" + this.BesiegedSettlement.StringId + "*" + (int)this.BesiegedSettlement.SettlementTotalWallHitPoints);
			}
		}

		// Token: 0x17000895 RID: 2197
		// (get) Token: 0x06002241 RID: 8769 RVA: 0x0009169C File Offset: 0x0008F89C
		public int SiegePeopleSeed
		{
			get
			{
				return Common.GetDJB2("" + this.SiegeStartTime.NumTicks + "*" + this.BesiegedSettlement.StringId + "*" + this.BesiegerCamp.NumberOfTroopsKilledOnSide + "#" + this.BesiegedSettlement.NumberOfTroopsKilledOnSide);
			}
		}

		// Token: 0x17000896 RID: 2198
		// (get) Token: 0x06002242 RID: 8770 RVA: 0x00091723 File Offset: 0x0008F923
		// (set) Token: 0x06002243 RID: 8771 RVA: 0x0009172B File Offset: 0x0008F92B
		[SaveableProperty(5)]
		public CampaignTime SiegeStartTime { get; private set; }

		// Token: 0x17000897 RID: 2199
		// (get) Token: 0x06002244 RID: 8772 RVA: 0x00091734 File Offset: 0x0008F934
		public bool IsPlayerSiegeEvent
		{
			get
			{
				return this.BesiegerCamp.LeaderParty.IsMainParty || PlayerSiege.PlayerSiegeEvent == this;
			}
		}

		// Token: 0x06002245 RID: 8773 RVA: 0x00091754 File Offset: 0x0008F954
		public List<PartyBase> GetInvolvedPartiesForEventType(MapEvent.BattleTypes battleType)
		{
			List<PartyBase> list = new List<PartyBase>();
			foreach (PartyBase item in this.BesiegerCamp.GetInvolvedPartiesForEventType(battleType))
			{
				list.Add(item);
			}
			foreach (PartyBase item2 in this.BesiegedSettlement.GetInvolvedPartiesForEventType(battleType))
			{
				list.Add(item2);
			}
			return list;
		}

		// Token: 0x06002246 RID: 8774 RVA: 0x000917F0 File Offset: 0x0008F9F0
		public MapEvent.BattleTypes GetCurrentBattleType()
		{
			BesiegerCamp besiegerCamp = this.BesiegerCamp;
			bool flag;
			if (besiegerCamp == null)
			{
				flag = (null != null);
			}
			else
			{
				MobileParty leaderParty = besiegerCamp.LeaderParty;
				flag = (((leaderParty != null) ? leaderParty.MapEvent : null) != null);
			}
			if (flag)
			{
				return this.BesiegerCamp.LeaderParty.MapEvent.EventType;
			}
			return MapEvent.BattleTypes.Siege;
		}

		// Token: 0x06002247 RID: 8775 RVA: 0x0009182C File Offset: 0x0008FA2C
		public SiegeEvent(Settlement settlement, MobileParty besiegerParty)
		{
			this.BesiegedSettlement = settlement;
			this.BesiegedSettlement.SiegeEvent = this;
			this.BesiegerCamp = new BesiegerCamp(this);
			besiegerParty.BesiegerCamp = this.BesiegerCamp;
			if (besiegerParty.LeaderHero != null && settlement.OwnerClan != null && settlement.OwnerClan != Clan.PlayerClan)
			{
				ChangeRelationAction.ApplyRelationChangeBetweenHeroes(settlement.OwnerClan.Leader, besiegerParty.LeaderHero, -5, besiegerParty.LeaderHero == Hero.MainHero);
			}
			this.BesiegerCamp.InitializeSiegeEventSide();
			this.BesiegedSettlement.InitializeSiegeEventSide();
			this.SiegeStartTime = CampaignTime.Now;
			foreach (MobileParty mobileParty in MobileParty.All)
			{
				if (mobileParty.DefaultBehavior == AiBehavior.GoToSettlement && mobileParty.TargetSettlement == settlement && mobileParty.CurrentSettlement != settlement)
				{
					mobileParty.Ai.SetMoveModeHold();
				}
			}
			foreach (MobileParty mobileParty2 in settlement.Parties)
			{
				if (mobileParty2.MapFaction == settlement.MapFaction && !mobileParty2.IsMilitia && !mobileParty2.IsGarrison && (mobileParty2.DefaultBehavior != AiBehavior.GoToSettlement || mobileParty2.TargetSettlement != settlement) && mobileParty2.DefaultBehavior != AiBehavior.Hold)
				{
					mobileParty2.Ai.SetMoveGoToSettlement(mobileParty2.CurrentSettlement);
				}
			}
			this.BesiegedSettlement.Party.SetLevelMaskIsDirty();
			CampaignEventDispatcher.Instance.OnSiegeEventStarted(this);
		}

		// Token: 0x17000898 RID: 2200
		// (get) Token: 0x06002248 RID: 8776 RVA: 0x000919D0 File Offset: 0x0008FBD0
		public bool ReadyToBeRemoved
		{
			get
			{
				return this.BesiegedSettlement.Party.SiegeEvent == null;
			}
		}

		// Token: 0x06002249 RID: 8777 RVA: 0x000919E8 File Offset: 0x0008FBE8
		public ISiegeEventSide GetSiegeEventSide(BattleSideEnum side)
		{
			if (side != BattleSideEnum.Attacker)
			{
				return this.BesiegedSettlement;
			}
			return this.BesiegerCamp;
		}

		// Token: 0x0600224A RID: 8778 RVA: 0x00091A0C File Offset: 0x0008FC0C
		public bool CanPartyJoinSide(PartyBase party, BattleSideEnum side)
		{
			IFaction partyFaction = party.MapFaction;
			BattleSideEnum side2 = BattleSideEnum.None;
			if (side != BattleSideEnum.Defender)
			{
				if (side == BattleSideEnum.Attacker)
				{
					side2 = BattleSideEnum.Defender;
				}
			}
			else
			{
				side2 = BattleSideEnum.Attacker;
			}
			bool flag = this.GetSiegeEventSide(side).GetInvolvedPartiesForEventType(MapEvent.BattleTypes.Siege).All((PartyBase x) => !x.MapFaction.IsAtWarWith(partyFaction));
			bool flag2 = this.GetSiegeEventSide(side2).GetInvolvedPartiesForEventType(MapEvent.BattleTypes.Siege).All((PartyBase x) => x.MapFaction.IsAtWarWith(partyFaction));
			return flag && flag2;
		}

		// Token: 0x0600224B RID: 8779 RVA: 0x00091A7C File Offset: 0x0008FC7C
		public void Tick(float dt)
		{
			if (CampaignTime.DeltaTime == CampaignTime.Zero)
			{
				return;
			}
			if (this.BesiegerCamp.LeaderParty.MapEvent != null || this.BesiegedSettlement.Party.MapEvent != null)
			{
				return;
			}
			this.TickSiegeEventSide(this.BesiegerCamp);
			this.TickSiegeEventSide(this.BesiegedSettlement);
		}

		// Token: 0x0600224C RID: 8780 RVA: 0x00091AD8 File Offset: 0x0008FCD8
		private void TickSiegeEventSide(ISiegeEventSide siegeEventSide)
		{
			this.AdvanceStrategy(siegeEventSide);
			this.ConstructionTick(siegeEventSide);
			this.BombardTick(siegeEventSide);
		}

		// Token: 0x0600224D RID: 8781 RVA: 0x00091AEF File Offset: 0x0008FCEF
		public void OnBeforeSiegeEventEnd(BattleState winnerSide, MapEvent.BattleTypes battleType)
		{
			if (battleType == MapEvent.BattleTypes.SallyOut)
			{
				this._isBesiegerDefeated = (winnerSide == BattleState.AttackerVictory);
				return;
			}
			if (battleType == MapEvent.BattleTypes.Siege || battleType == MapEvent.BattleTypes.SiegeOutside)
			{
				this._isBesiegerDefeated = (winnerSide == BattleState.DefenderVictory);
			}
		}

		// Token: 0x0600224E RID: 8782 RVA: 0x00091B14 File Offset: 0x0008FD14
		public void FinalizeSiegeEvent()
		{
			CampaignEventDispatcher.Instance.OnSiegeEventEnded(this);
			if (PlayerSiege.PlayerSiegeEvent == this)
			{
				PlayerSiege.OnSiegeEventFinalized(this._isBesiegerDefeated);
			}
			else if (PlayerSiege.PlayerSiegeEvent == null && MobileParty.MainParty.CurrentSettlement != null && MobileParty.MainParty.CurrentSettlement.SiegeEvent == this && !Hero.MainHero.IsPrisoner)
			{
				GameMenu.SwitchToMenu(this._isBesiegerDefeated ? "siege_attacker_defeated" : "siege_attacker_left");
			}
			this.BesiegerCamp.FinalizeSiegeEvent();
			this.BesiegedSettlement.FinalizeSiegeEvent();
			if (this.BesiegedSettlement.Party.MapEvent != null && !this.BesiegedSettlement.Party.MapEvent.IsSallyOut)
			{
				this.BesiegedSettlement.Party.MapEvent.FinalizeEvent();
			}
			if (this.BesiegedSettlement.Town != null && this.BesiegedSettlement.Town.GarrisonParty != null && this.BesiegedSettlement.Town.GarrisonParty.DefaultBehavior == AiBehavior.EngageParty)
			{
				this.BesiegedSettlement.Town.GarrisonParty.Ai.SetMoveModeHold();
			}
			if (this == PlayerSiege.PlayerSiegeEvent)
			{
				PlayerSiege.ClosePlayerSiege();
			}
		}

		// Token: 0x0600224F RID: 8783 RVA: 0x00091C3D File Offset: 0x0008FE3D
		public bool IsPartyInvolved(PartyBase party)
		{
			return this.GetInvolvedPartiesForEventType(this.GetCurrentBattleType()).Contains(party);
		}

		// Token: 0x06002250 RID: 8784 RVA: 0x00091C54 File Offset: 0x0008FE54
		public void DoSiegeAction(ISiegeEventSide siegeEventSide, SiegeStrategyActionModel.SiegeAction siegeAction, SiegeEngineType siegeEngineType, int deploymentIndex, int reserveIndex)
		{
			SiegeEvent.SiegeEnginesContainer siegeEngines = siegeEventSide.SiegeEngines;
			switch (siegeAction)
			{
			case SiegeStrategyActionModel.SiegeAction.ConstructNewSiegeEngine:
			{
				float siegeEngineHitPoints = Campaign.Current.Models.SiegeEventModel.GetSiegeEngineHitPoints(siegeEventSide.SiegeEvent, siegeEngineType, siegeEventSide.BattleSide);
				SiegeEvent.SiegeEngineConstructionProgress siegeEngine = new SiegeEvent.SiegeEngineConstructionProgress(siegeEngineType, 0f, siegeEngineHitPoints);
				siegeEngines.DeploySiegeEngineAtIndex(siegeEngine, deploymentIndex);
				this.BesiegedSettlement.Party.SetVisualAsDirty();
				return;
			}
			case SiegeStrategyActionModel.SiegeAction.DeploySiegeEngineFromReserve:
			{
				SiegeEvent.SiegeEngineConstructionProgress siegeEngine2 = siegeEngines.ReservedSiegeEngines[reserveIndex];
				siegeEngines.DeploySiegeEngineAtIndex(siegeEngine2, deploymentIndex);
				this.BesiegedSettlement.Party.SetVisualAsDirty();
				return;
			}
			case SiegeStrategyActionModel.SiegeAction.MoveSiegeEngineToReserve:
				siegeEngines.RemoveDeployedSiegeEngine(deploymentIndex, siegeEngineType.IsRanged, true);
				this.BesiegedSettlement.Party.SetVisualAsDirty();
				return;
			case SiegeStrategyActionModel.SiegeAction.RemoveDeployedSiegeEngine:
				siegeEngines.RemoveDeployedSiegeEngine(deploymentIndex, siegeEngineType.IsRanged, false);
				this.BesiegedSettlement.Party.SetVisualAsDirty();
				return;
			case SiegeStrategyActionModel.SiegeAction.Hold:
				return;
			default:
				throw new ArgumentOutOfRangeException();
			}
		}

		// Token: 0x06002251 RID: 8785 RVA: 0x00091D40 File Offset: 0x0008FF40
		public void AdvanceStrategy(ISiegeEventSide siegeEventSide)
		{
			SiegeStrategyActionModel.SiegeAction siegeAction;
			SiegeEngineType siegeEngineType;
			int deploymentIndex;
			int reserveIndex;
			Campaign.Current.Models.SiegeStrategyActionModel.GetLogicalActionForStrategy(siegeEventSide, out siegeAction, out siegeEngineType, out deploymentIndex, out reserveIndex);
			this.DoSiegeAction(siegeEventSide, siegeAction, siegeEngineType, deploymentIndex, reserveIndex);
		}

		// Token: 0x06002252 RID: 8786 RVA: 0x00091D78 File Offset: 0x0008FF78
		public void BreakSiegeEngine(ISiegeEventSide siegeEventSide, SiegeEngineType siegeEngineType)
		{
			if (siegeEngineType == DefaultSiegeEngineTypes.Preparations)
			{
				if (siegeEventSide.BattleSide == BattleSideEnum.Attacker)
				{
					siegeEventSide.SiegeEngines.SiegePreparations.SetProgress(0f);
				}
				return;
			}
			if (siegeEngineType.IsRanged)
			{
				for (int i = siegeEventSide.SiegeEngines.DeployedRangedSiegeEngines.Length - 1; i >= 0; i--)
				{
					SiegeEvent.SiegeEngineConstructionProgress siegeEngineConstructionProgress = siegeEventSide.SiegeEngines.DeployedRangedSiegeEngines[i];
					if (siegeEngineConstructionProgress != null && siegeEngineConstructionProgress.SiegeEngine == siegeEngineType && siegeEngineConstructionProgress.IsActive)
					{
						siegeEventSide.SiegeEngines.RemoveDeployedSiegeEngine(i, true, false);
						this.BesiegedSettlement.Party.SetVisualAsDirty();
						return;
					}
				}
				return;
			}
			for (int j = siegeEventSide.SiegeEngines.DeployedMeleeSiegeEngines.Length - 1; j >= 0; j--)
			{
				SiegeEvent.SiegeEngineConstructionProgress siegeEngineConstructionProgress2 = siegeEventSide.SiegeEngines.DeployedMeleeSiegeEngines[j];
				if (siegeEngineConstructionProgress2 != null && siegeEngineConstructionProgress2.SiegeEngine == siegeEngineType && siegeEngineConstructionProgress2.IsActive)
				{
					siegeEventSide.SiegeEngines.RemoveDeployedSiegeEngine(j, false, false);
					this.BesiegedSettlement.Party.SetVisualAsDirty();
					return;
				}
			}
		}

		// Token: 0x06002253 RID: 8787 RVA: 0x00091E6C File Offset: 0x0009006C
		public Dictionary<SiegeEngineType, int> GetPreparedSiegeEnginesAsDictionary(ISiegeEventSide siegeEventSide)
		{
			Dictionary<SiegeEngineType, int> dictionary = new Dictionary<SiegeEngineType, int>();
			foreach (SiegeEvent.SiegeEngineConstructionProgress siegeEngineConstructionProgress in siegeEventSide.SiegeEngines.AllSiegeEngines())
			{
				if (siegeEngineConstructionProgress.IsActive && siegeEngineConstructionProgress.Hitpoints > 0f && siegeEngineConstructionProgress.SiegeEngine != DefaultSiegeEngineTypes.Preparations)
				{
					if (dictionary.ContainsKey(siegeEngineConstructionProgress.SiegeEngine))
					{
						Dictionary<SiegeEngineType, int> dictionary2 = dictionary;
						SiegeEngineType siegeEngine = siegeEngineConstructionProgress.SiegeEngine;
						dictionary2[siegeEngine]++;
					}
					else
					{
						dictionary.Add(siegeEngineConstructionProgress.SiegeEngine, 1);
					}
				}
			}
			return dictionary;
		}

		// Token: 0x06002254 RID: 8788 RVA: 0x00091F1C File Offset: 0x0009011C
		public List<MissionSiegeWeapon> GetPreparedAndActiveSiegeEngines(ISiegeEventSide siegeEventSide)
		{
			List<MissionSiegeWeapon> list = new List<MissionSiegeWeapon>();
			MBReadOnlyList<SiegeEvent.SiegeEngineConstructionProgress> deployedSiegeEngines = siegeEventSide.SiegeEngines.DeployedSiegeEngines;
			for (int i = 0; i < deployedSiegeEngines.Count; i++)
			{
				SiegeEvent.SiegeEngineConstructionProgress siegeEngineConstructionProgress = deployedSiegeEngines[i];
				if (siegeEngineConstructionProgress.IsActive && siegeEngineConstructionProgress.Hitpoints > 0f && siegeEngineConstructionProgress.SiegeEngine != DefaultSiegeEngineTypes.Preparations)
				{
					list.Add(MissionSiegeWeapon.CreateCampaignWeapon(siegeEngineConstructionProgress.SiegeEngine, i, siegeEngineConstructionProgress.Hitpoints, siegeEngineConstructionProgress.MaxHitPoints));
				}
			}
			return list;
		}

		// Token: 0x06002255 RID: 8789 RVA: 0x00091F95 File Offset: 0x00090195
		public void SetSiegeEngineStatesAfterSiegeMission(IEnumerable<IMissionSiegeWeapon> attackerMissionSiegeEngineData, IEnumerable<IMissionSiegeWeapon> defenderMissionSiegeEngineData)
		{
			this.SetSiegeEngineStatesForSiegeSide(this.BesiegerCamp, attackerMissionSiegeEngineData);
			this.SetSiegeEngineStatesForSiegeSide(this.BesiegedSettlement, defenderMissionSiegeEngineData);
		}

		// Token: 0x06002256 RID: 8790 RVA: 0x00091FB4 File Offset: 0x000901B4
		private void SetSiegeEngineStatesForSiegeSide(ISiegeEventSide side, IEnumerable<IMissionSiegeWeapon> missionSiegeEngineData)
		{
			if (missionSiegeEngineData != null && missionSiegeEngineData.Any<IMissionSiegeWeapon>())
			{
				int num = missionSiegeEngineData.Count<IMissionSiegeWeapon>() - 1;
				MapEvent battle = PlayerEncounter.Battle;
				bool flag = battle != null && battle.IsSiegeAmbush;
				for (int i = side.SiegeEngines.DeployedSiegeEngines.Count - 1; i >= 0; i--)
				{
					SiegeEvent.SiegeEngineConstructionProgress siegeEngineConstructionProgress = side.SiegeEngines.DeployedSiegeEngines.ElementAt(i);
					if (siegeEngineConstructionProgress.IsActive)
					{
						IMissionSiegeWeapon missionSiegeWeapon = missionSiegeEngineData.ElementAt(num);
						num--;
						if ((siegeEngineConstructionProgress.SiegeEngine.IsRanged || flag) && missionSiegeWeapon.Health > 0f)
						{
							siegeEngineConstructionProgress.SetHitpoints(missionSiegeWeapon.Health);
						}
						else if (!flag || missionSiegeWeapon.Health <= 0f)
						{
							this.BreakSiegeEngine(side, siegeEngineConstructionProgress.SiegeEngine);
						}
					}
				}
			}
		}

		// Token: 0x06002257 RID: 8791 RVA: 0x0009207C File Offset: 0x0009027C
		public void CreateSiegeObject(SiegeEvent.SiegeEngineConstructionProgress siegeEngineConstructionProgress, ISiegeEventSide siegeSide)
		{
			if (siegeEngineConstructionProgress.SiegeEngine.IsRanged)
			{
				siegeEngineConstructionProgress.SetRangedSiegeEngine(new SiegeEvent.RangedSiegeEngine(siegeEngineConstructionProgress.SiegeEngine, siegeSide));
			}
			SiegeEngineType siegeEngine = siegeEngineConstructionProgress.SiegeEngine;
			CampaignEventDispatcher.Instance.SiegeEngineBuilt(this, siegeSide.BattleSide, siegeEngine);
			this.BesiegedSettlement.Party.SetVisualAsDirty();
		}

		// Token: 0x06002258 RID: 8792 RVA: 0x000920D1 File Offset: 0x000902D1
		public override string ToString()
		{
			return "Siege of " + this.BesiegedSettlement.Name;
		}

		// Token: 0x06002259 RID: 8793 RVA: 0x000920E8 File Offset: 0x000902E8
		public void ConstructionTick(ISiegeEventSide siegeEventSide)
		{
			SiegeEvent.SiegeEngineConstructionProgress siegeEngineConstructionProgress = null;
			if (siegeEventSide.SiegeEngines.SiegePreparations != null && !siegeEventSide.SiegeEngines.SiegePreparations.IsActive)
			{
				siegeEngineConstructionProgress = siegeEventSide.SiegeEngines.SiegePreparations;
			}
			else
			{
				foreach (SiegeEvent.SiegeEngineConstructionProgress siegeEngineConstructionProgress2 in siegeEventSide.SiegeEngines.DeployedSiegeEngines)
				{
					if (!siegeEngineConstructionProgress2.IsConstructed && !siegeEngineConstructionProgress2.IsBeingRedeployed)
					{
						siegeEngineConstructionProgress = siegeEngineConstructionProgress2;
						break;
					}
				}
			}
			if (siegeEngineConstructionProgress != null)
			{
				float num = (float)((double)Campaign.Current.Models.SiegeEventModel.GetConstructionProgressPerHour(siegeEngineConstructionProgress.SiegeEngine, this, siegeEventSide) * CampaignTime.DeltaTime.ToHours);
				siegeEngineConstructionProgress.SetProgress(MBMath.ClampFloat(siegeEngineConstructionProgress.Progress + num, 0f, 1f));
				if (siegeEngineConstructionProgress.IsActive)
				{
					this.CreateSiegeObject(siegeEngineConstructionProgress, siegeEventSide);
				}
			}
			float num2 = 2f;
			foreach (SiegeEvent.SiegeEngineConstructionProgress siegeEngineConstructionProgress3 in siegeEventSide.SiegeEngines.DeployedSiegeEngines)
			{
				if (siegeEngineConstructionProgress3.IsConstructed && siegeEngineConstructionProgress3.IsBeingRedeployed)
				{
					float num3 = (float)((double)(1f / num2) * CampaignTime.DeltaTime.ToHours);
					siegeEngineConstructionProgress3.SetRedeploymentProgress(MBMath.ClampFloat(siegeEngineConstructionProgress3.RedeploymentProgress + num3, 0f, 1f));
					if (siegeEngineConstructionProgress3.IsActive)
					{
						this.BesiegedSettlement.Party.SetVisualAsDirty();
					}
				}
			}
			if (siegeEventSide.SiegeEngines.ClearRemovedEnginesIfNecessary())
			{
				this.BesiegedSettlement.Party.SetVisualAsDirty();
			}
		}

		// Token: 0x0600225A RID: 8794 RVA: 0x000922A8 File Offset: 0x000904A8
		public void BombardTick(ISiegeEventSide siegeEventSide)
		{
			if (CampaignTime.DeltaTime == CampaignTime.Zero)
			{
				return;
			}
			SiegeEvent.SiegeEnginesContainer siegeEngines = this.GetSiegeEventSide(siegeEventSide.BattleSide.GetOppositeSide()).SiegeEngines;
			for (int i = 0; i < siegeEventSide.SiegeEngineMissiles.Count; i++)
			{
				SiegeEvent.SiegeEngineMissile siegeEngineMissile = siegeEventSide.SiegeEngineMissiles[i];
				if (siegeEngineMissile.CollisionTime.IsPast && siegeEngineMissile.HitSuccessful)
				{
					SiegeBombardTargets targetType = siegeEngineMissile.TargetType;
					if (targetType != SiegeBombardTargets.Wall)
					{
						if (targetType != SiegeBombardTargets.RangedEngines)
						{
							Debug.FailedAssert("Invalid target type on hit", "C:\\Develop\\MB3\\Source\\Bannerlord\\TaleWorlds.CampaignSystem\\Siege\\SiegeEvent.cs", "BombardTick", 936);
						}
						else
						{
							SiegeEvent.SiegeEngineConstructionProgress siegeEngineConstructionProgress = siegeEngines.DeployedRangedSiegeEngines[siegeEngineMissile.TargetSlotIndex];
							SiegeEvent.SiegeEngineConstructionProgress targetSiegeEngine = siegeEngineMissile.TargetSiegeEngine;
							if (siegeEngineConstructionProgress != null && siegeEngineConstructionProgress.IsActive && siegeEngineConstructionProgress.Hitpoints > 0f)
							{
								this.BombardHitEngine(siegeEventSide, siegeEngineMissile.ShooterSiegeEngineType, siegeEngineConstructionProgress);
							}
							else if (targetSiegeEngine != null && targetSiegeEngine != siegeEngineConstructionProgress && ((siegeEngines.DeployedRangedSiegeEngines.Contains(targetSiegeEngine) && targetSiegeEngine.IsActive) || siegeEngines.ReservedSiegeEngines.Contains(targetSiegeEngine)))
							{
								this.BombardHitEngine(siegeEventSide, siegeEngineMissile.ShooterSiegeEngineType, targetSiegeEngine);
							}
						}
					}
					else
					{
						this.BesiegerCamp.BombardHitWalls(siegeEngineMissile.ShooterSiegeEngineType, siegeEngineMissile.TargetSlotIndex);
					}
				}
			}
			siegeEventSide.RemoveDeprecatedMissiles();
			foreach (SiegeEvent.SiegeEngineConstructionProgress siegeEngineConstructionProgress2 in siegeEventSide.SiegeEngines.DeployedSiegeEngines)
			{
				if (siegeEngineConstructionProgress2.IsActive)
				{
					SiegeEvent.SiegeEngineConstructionProgress attackerSiegeEngine = siegeEngineConstructionProgress2;
					SiegeEngineType siegeEngine = siegeEngineConstructionProgress2.SiegeEngine;
					SiegeEvent.RangedSiegeEngine rangedSiegeEngine = siegeEngineConstructionProgress2.RangedSiegeEngine;
					if (siegeEngine.IsRanged && rangedSiegeEngine != null && rangedSiegeEngine.IsReadyToFire)
					{
						rangedSiegeEngine.Reload();
						if (attackerSiegeEngine.Hitpoints > 0f)
						{
							int num = siegeEngine.IsRanged ? siegeEventSide.SiegeEngines.DeployedRangedSiegeEngines.FindIndex((SiegeEvent.SiegeEngineConstructionProgress engine) => engine == attackerSiegeEngine) : siegeEventSide.SiegeEngines.DeployedMeleeSiegeEngines.FindIndex((SiegeEvent.SiegeEngineConstructionProgress engine) => engine == attackerSiegeEngine);
							SiegeBombardTargets siegeBombardTargets;
							int num2;
							siegeEventSide.GetAttackTarget(siegeEventSide, attackerSiegeEngine.SiegeEngine, num, out siegeBombardTargets, out num2);
							if (siegeBombardTargets != SiegeBombardTargets.None)
							{
								rangedSiegeEngine.OnFireDecisionTaken(this, siegeEventSide.BattleSide, num2, siegeBombardTargets);
								float siegeEngineHitChance = Campaign.Current.Models.SiegeEventModel.GetSiegeEngineHitChance(siegeEngine, siegeEventSide.BattleSide, siegeBombardTargets, this.BesiegedSettlement.Town);
								bool hitSuccessful = MBRandom.RandomFloat < siegeEngineHitChance;
								SiegeEvent.SiegeEngineConstructionProgress targetSiegeEngine2 = null;
								if (siegeBombardTargets == SiegeBombardTargets.RangedEngines)
								{
									targetSiegeEngine2 = siegeEngines.DeployedRangedSiegeEngines[num2];
								}
								SiegeEvent.SiegeEngineMissile missile = new SiegeEvent.SiegeEngineMissile(siegeEngine, num, siegeBombardTargets, num2, targetSiegeEngine2, rangedSiegeEngine.NextProjectileCollisionTime, CampaignTime.Now, hitSuccessful);
								siegeEventSide.AddSiegeEngineMissile(missile);
							}
							else
							{
								rangedSiegeEngine.Hold();
							}
						}
					}
				}
			}
		}

		// Token: 0x0600225B RID: 8795 RVA: 0x000925B4 File Offset: 0x000907B4
		private float GetDistanceBetweenTwoRangedEngine(int attackerSlotIndex, int defenderSlotIndex)
		{
			return (float)MathF.Abs(attackerSlotIndex - defenderSlotIndex) * 1f + 3f;
		}

		// Token: 0x0600225C RID: 8796 RVA: 0x000925CB File Offset: 0x000907CB
		private float PriorityCalculationForEngines(float distance)
		{
			return 7f - distance;
		}

		// Token: 0x0600225D RID: 8797 RVA: 0x000925D4 File Offset: 0x000907D4
		public void FindAttackableRangedEngineWithHighestPriority(ISiegeEventSide siegeEventSide, int attackerSlotIndex, out int targetIndex, out float targetPriority)
		{
			targetIndex = -1;
			targetPriority = 0f;
			float num = 9999f;
			SiegeEvent.SiegeEngineConstructionProgress[] deployedRangedSiegeEngines = this.GetSiegeEventSide(siegeEventSide.BattleSide.GetOppositeSide()).SiegeEngines.DeployedRangedSiegeEngines;
			for (int i = 0; i < deployedRangedSiegeEngines.Length; i++)
			{
				SiegeEvent.SiegeEngineConstructionProgress siegeEngineConstructionProgress = deployedRangedSiegeEngines[i];
				if (siegeEngineConstructionProgress != null && siegeEngineConstructionProgress.IsActive && siegeEngineConstructionProgress.Hitpoints > 0f)
				{
					float distanceBetweenTwoRangedEngine = this.GetDistanceBetweenTwoRangedEngine(attackerSlotIndex, i);
					float num2 = this.PriorityCalculationForEngines(distanceBetweenTwoRangedEngine);
					if (num2 > targetPriority || (MathF.Abs(num2 - targetPriority) < 0.0001f && num > distanceBetweenTwoRangedEngine))
					{
						targetIndex = i;
						targetPriority = num2;
						num = distanceBetweenTwoRangedEngine;
					}
				}
			}
		}

		// Token: 0x0600225E RID: 8798 RVA: 0x0009267C File Offset: 0x0009087C
		private void OnSiegeEngineDestroyed(ISiegeEventSide siegeEventSide, SiegeEvent.SiegeEngineConstructionProgress siegeEngine)
		{
			int num = siegeEventSide.SiegeEngines.FindDeploymentIndexOfDeployedEngine(siegeEngine);
			if (num == -1)
			{
				siegeEventSide.SiegeEngines.RemovedSiegeEngineFromReservedSiegeEngines(siegeEngine);
			}
			else
			{
				this.DoSiegeAction(siegeEventSide, SiegeStrategyActionModel.SiegeAction.RemoveDeployedSiegeEngine, siegeEngine.SiegeEngine, num, -1);
			}
			this.BesiegedSettlement.Party.SetVisualAsDirty();
			CampaignEventDispatcher.Instance.OnSiegeEngineDestroyed(this.BesiegerCamp.LeaderParty, this.BesiegedSettlement, siegeEventSide.BattleSide, siegeEngine.SiegeEngine);
		}

		// Token: 0x0600225F RID: 8799 RVA: 0x000926F0 File Offset: 0x000908F0
		private void BombardHitEngine(ISiegeEventSide siegeEventSide, SiegeEngineType attackerEngineType, SiegeEvent.SiegeEngineConstructionProgress damagedEngine)
		{
			ISiegeEventSide siegeEventSide2 = this.GetSiegeEventSide(siegeEventSide.BattleSide.GetOppositeSide());
			float siegeEngineDamage = Campaign.Current.Models.SiegeEventModel.GetSiegeEngineDamage(this, siegeEventSide.BattleSide, attackerEngineType, SiegeBombardTargets.RangedEngines);
			damagedEngine.SetHitpoints(damagedEngine.Hitpoints - siegeEngineDamage);
			CampaignEventDispatcher.Instance.OnSiegeBombardmentHit(this.BesiegerCamp.LeaderParty, this.BesiegedSettlement, siegeEventSide.BattleSide, attackerEngineType, SiegeBombardTargets.RangedEngines);
			if (damagedEngine.Hitpoints <= 0f)
			{
				this.OnSiegeEngineDestroyed(siegeEventSide2, damagedEngine);
			}
			if (this.IsPlayerSiegeEvent)
			{
				Debug.Print(string.Concat(new object[]
				{
					this.BesiegedSettlement.Name,
					" - ",
					siegeEventSide.BattleSide.ToString(),
					" ",
					attackerEngineType.Name,
					" hit the enemy ranged siege engine(",
					damagedEngine.SiegeEngine.Name,
					") for ",
					siegeEngineDamage
				}), 0, Debug.DebugColor.Purple, 137438953472UL);
			}
		}

		// Token: 0x04000A8D RID: 2701
		[SaveableField(6)]
		public readonly Settlement BesiegedSettlement;

		// Token: 0x04000A8E RID: 2702
		[SaveableField(10)]
		public readonly BesiegerCamp BesiegerCamp;

		// Token: 0x04000A8F RID: 2703
		[SaveableField(144)]
		private bool _isBesiegerDefeated;

		// Token: 0x02000599 RID: 1433
		public class RangedSiegeEngine
		{
			// Token: 0x0600463D RID: 17981 RVA: 0x0014B686 File Offset: 0x00149886
			internal static void AutoGeneratedStaticCollectObjectsRangedSiegeEngine(object o, List<object> collectedObjects)
			{
				((SiegeEvent.RangedSiegeEngine)o).AutoGeneratedInstanceCollectObjects(collectedObjects);
			}

			// Token: 0x0600463E RID: 17982 RVA: 0x0014B694 File Offset: 0x00149894
			protected virtual void AutoGeneratedInstanceCollectObjects(List<object> collectedObjects)
			{
				collectedObjects.Add(this.EngineType);
				CampaignTime.AutoGeneratedStaticCollectObjectsCampaignTime(this.NextTimeEngineCanBombard, collectedObjects);
				CampaignTime.AutoGeneratedStaticCollectObjectsCampaignTime(this.LastBombardTime, collectedObjects);
			}

			// Token: 0x0600463F RID: 17983 RVA: 0x0014B6C4 File Offset: 0x001498C4
			internal static object AutoGeneratedGetMemberValueNextTimeEngineCanBombard(object o)
			{
				return ((SiegeEvent.RangedSiegeEngine)o).NextTimeEngineCanBombard;
			}

			// Token: 0x06004640 RID: 17984 RVA: 0x0014B6D6 File Offset: 0x001498D6
			internal static object AutoGeneratedGetMemberValueAlreadyFired(object o)
			{
				return ((SiegeEvent.RangedSiegeEngine)o).AlreadyFired;
			}

			// Token: 0x06004641 RID: 17985 RVA: 0x0014B6E8 File Offset: 0x001498E8
			internal static object AutoGeneratedGetMemberValueCurrentTargetType(object o)
			{
				return ((SiegeEvent.RangedSiegeEngine)o).CurrentTargetType;
			}

			// Token: 0x06004642 RID: 17986 RVA: 0x0014B6FA File Offset: 0x001498FA
			internal static object AutoGeneratedGetMemberValueCurrentTargetIndex(object o)
			{
				return ((SiegeEvent.RangedSiegeEngine)o).CurrentTargetIndex;
			}

			// Token: 0x06004643 RID: 17987 RVA: 0x0014B70C File Offset: 0x0014990C
			internal static object AutoGeneratedGetMemberValuePreviousDamagedTargetType(object o)
			{
				return ((SiegeEvent.RangedSiegeEngine)o).PreviousDamagedTargetType;
			}

			// Token: 0x06004644 RID: 17988 RVA: 0x0014B71E File Offset: 0x0014991E
			internal static object AutoGeneratedGetMemberValuePreviousTargetIndex(object o)
			{
				return ((SiegeEvent.RangedSiegeEngine)o).PreviousTargetIndex;
			}

			// Token: 0x06004645 RID: 17989 RVA: 0x0014B730 File Offset: 0x00149930
			internal static object AutoGeneratedGetMemberValueLastBombardTime(object o)
			{
				return ((SiegeEvent.RangedSiegeEngine)o).LastBombardTime;
			}

			// Token: 0x06004646 RID: 17990 RVA: 0x0014B742 File Offset: 0x00149942
			internal static object AutoGeneratedGetMemberValueEngineType(object o)
			{
				return ((SiegeEvent.RangedSiegeEngine)o).EngineType;
			}

			// Token: 0x17000DD5 RID: 3541
			// (get) Token: 0x06004647 RID: 17991 RVA: 0x0014B74F File Offset: 0x0014994F
			// (set) Token: 0x06004648 RID: 17992 RVA: 0x0014B757 File Offset: 0x00149957
			[SaveableProperty(2)]
			public CampaignTime NextTimeEngineCanBombard { get; private set; }

			// Token: 0x17000DD6 RID: 3542
			// (get) Token: 0x06004649 RID: 17993 RVA: 0x0014B760 File Offset: 0x00149960
			// (set) Token: 0x0600464A RID: 17994 RVA: 0x0014B768 File Offset: 0x00149968
			[SaveableProperty(3)]
			public bool AlreadyFired { get; private set; }

			// Token: 0x17000DD7 RID: 3543
			// (get) Token: 0x0600464B RID: 17995 RVA: 0x0014B771 File Offset: 0x00149971
			// (set) Token: 0x0600464C RID: 17996 RVA: 0x0014B779 File Offset: 0x00149979
			[SaveableProperty(4)]
			public SiegeBombardTargets CurrentTargetType { get; private set; }

			// Token: 0x17000DD8 RID: 3544
			// (get) Token: 0x0600464D RID: 17997 RVA: 0x0014B782 File Offset: 0x00149982
			// (set) Token: 0x0600464E RID: 17998 RVA: 0x0014B78A File Offset: 0x0014998A
			[SaveableProperty(5)]
			public int CurrentTargetIndex { get; private set; }

			// Token: 0x17000DD9 RID: 3545
			// (get) Token: 0x0600464F RID: 17999 RVA: 0x0014B793 File Offset: 0x00149993
			// (set) Token: 0x06004650 RID: 18000 RVA: 0x0014B79B File Offset: 0x0014999B
			[SaveableProperty(6)]
			public SiegeBombardTargets PreviousDamagedTargetType { get; private set; }

			// Token: 0x17000DDA RID: 3546
			// (get) Token: 0x06004651 RID: 18001 RVA: 0x0014B7A4 File Offset: 0x001499A4
			// (set) Token: 0x06004652 RID: 18002 RVA: 0x0014B7AC File Offset: 0x001499AC
			[SaveableProperty(7)]
			public int PreviousTargetIndex { get; private set; }

			// Token: 0x17000DDB RID: 3547
			// (get) Token: 0x06004653 RID: 18003 RVA: 0x0014B7B5 File Offset: 0x001499B5
			// (set) Token: 0x06004654 RID: 18004 RVA: 0x0014B7BD File Offset: 0x001499BD
			[SaveableProperty(8)]
			public CampaignTime LastBombardTime { get; private set; }

			// Token: 0x17000DDC RID: 3548
			// (get) Token: 0x06004655 RID: 18005 RVA: 0x0014B7C8 File Offset: 0x001499C8
			public CampaignTime NextProjectileCollisionTime
			{
				get
				{
					if (this.LastBombardTime.IsFuture)
					{
						return CampaignTime.Never;
					}
					return this.NextTimeEngineCanBombard;
				}
			}

			// Token: 0x17000DDD RID: 3549
			// (get) Token: 0x06004656 RID: 18006 RVA: 0x0014B7F4 File Offset: 0x001499F4
			public bool IsReadyToFire
			{
				get
				{
					return this.NextTimeEngineCanBombard.IsPast;
				}
			}

			// Token: 0x06004657 RID: 18007 RVA: 0x0014B810 File Offset: 0x00149A10
			public RangedSiegeEngine(SiegeEngineType engineType, ISiegeEventSide siegeSide)
			{
				this.EngineType = engineType;
				this.CurrentTargetType = SiegeBombardTargets.None;
				this.CurrentTargetIndex = -1;
				this.PreviousDamagedTargetType = SiegeBombardTargets.None;
				this.PreviousTargetIndex = -1;
				this.AlreadyFired = false;
				this.LastBombardTime = CampaignTime.Never;
				this.CalculateNextFireTime(siegeSide.SiegeEvent, siegeSide.BattleSide);
			}

			// Token: 0x06004658 RID: 18008 RVA: 0x0014B86A File Offset: 0x00149A6A
			public void Hold()
			{
				this.CurrentTargetType = SiegeBombardTargets.None;
				this.CurrentTargetIndex = -1;
			}

			// Token: 0x06004659 RID: 18009 RVA: 0x0014B87A File Offset: 0x00149A7A
			public void Reload()
			{
				this.AlreadyFired = false;
			}

			// Token: 0x0600465A RID: 18010 RVA: 0x0014B884 File Offset: 0x00149A84
			public void OnFireDecisionTaken(SiegeEvent siegeEvent, BattleSideEnum battleSide, int targetSlotIndex, SiegeBombardTargets targetType)
			{
				this.PreviousDamagedTargetType = this.CurrentTargetType;
				this.PreviousTargetIndex = this.CurrentTargetIndex;
				this.CurrentTargetIndex = targetSlotIndex;
				this.CurrentTargetType = targetType;
				this.AlreadyFired = true;
				this.LastBombardTime = CampaignTime.Now;
				this.CalculateNextFireTime(siegeEvent, battleSide);
			}

			// Token: 0x0600465B RID: 18011 RVA: 0x0014B8D4 File Offset: 0x00149AD4
			private void CalculateNextFireTime(SiegeEvent siegeEvent, BattleSideEnum battleSide)
			{
				CampaignTime g = CampaignTime.Minutes((long)Campaign.Current.Models.SiegeEventModel.GetRangedSiegeEngineReloadTime(siegeEvent, battleSide, this.EngineType));
				this.NextTimeEngineCanBombard = CampaignTime.Now + g;
			}

			// Token: 0x04001754 RID: 5972
			[SaveableField(1)]
			public readonly SiegeEngineType EngineType;
		}

		// Token: 0x0200059A RID: 1434
		public class SiegeEngineConstructionProgress
		{
			// Token: 0x0600465C RID: 18012 RVA: 0x0014B915 File Offset: 0x00149B15
			internal static void AutoGeneratedStaticCollectObjectsSiegeEngineConstructionProgress(object o, List<object> collectedObjects)
			{
				((SiegeEvent.SiegeEngineConstructionProgress)o).AutoGeneratedInstanceCollectObjects(collectedObjects);
			}

			// Token: 0x0600465D RID: 18013 RVA: 0x0014B923 File Offset: 0x00149B23
			protected virtual void AutoGeneratedInstanceCollectObjects(List<object> collectedObjects)
			{
				collectedObjects.Add(this.SiegeEngine);
				collectedObjects.Add(this.RangedSiegeEngine);
			}

			// Token: 0x0600465E RID: 18014 RVA: 0x0014B93D File Offset: 0x00149B3D
			internal static object AutoGeneratedGetMemberValueHitpoints(object o)
			{
				return ((SiegeEvent.SiegeEngineConstructionProgress)o).Hitpoints;
			}

			// Token: 0x0600465F RID: 18015 RVA: 0x0014B94F File Offset: 0x00149B4F
			internal static object AutoGeneratedGetMemberValueProgress(object o)
			{
				return ((SiegeEvent.SiegeEngineConstructionProgress)o).Progress;
			}

			// Token: 0x06004660 RID: 18016 RVA: 0x0014B961 File Offset: 0x00149B61
			internal static object AutoGeneratedGetMemberValueRangedSiegeEngine(object o)
			{
				return ((SiegeEvent.SiegeEngineConstructionProgress)o).RangedSiegeEngine;
			}

			// Token: 0x06004661 RID: 18017 RVA: 0x0014B96E File Offset: 0x00149B6E
			internal static object AutoGeneratedGetMemberValueRedeploymentProgress(object o)
			{
				return ((SiegeEvent.SiegeEngineConstructionProgress)o).RedeploymentProgress;
			}

			// Token: 0x06004662 RID: 18018 RVA: 0x0014B980 File Offset: 0x00149B80
			internal static object AutoGeneratedGetMemberValueMaxHitPoints(object o)
			{
				return ((SiegeEvent.SiegeEngineConstructionProgress)o).MaxHitPoints;
			}

			// Token: 0x06004663 RID: 18019 RVA: 0x0014B992 File Offset: 0x00149B92
			internal static object AutoGeneratedGetMemberValueSiegeEngine(object o)
			{
				return ((SiegeEvent.SiegeEngineConstructionProgress)o).SiegeEngine;
			}

			// Token: 0x17000DDE RID: 3550
			// (get) Token: 0x06004664 RID: 18020 RVA: 0x0014B99F File Offset: 0x00149B9F
			public bool IsActive
			{
				get
				{
					return this.IsConstructed && !this.IsBeingRedeployed;
				}
			}

			// Token: 0x17000DDF RID: 3551
			// (get) Token: 0x06004665 RID: 18021 RVA: 0x0014B9B4 File Offset: 0x00149BB4
			// (set) Token: 0x06004666 RID: 18022 RVA: 0x0014B9BC File Offset: 0x00149BBC
			[SaveableProperty(3)]
			public float Hitpoints { get; private set; }

			// Token: 0x17000DE0 RID: 3552
			// (get) Token: 0x06004667 RID: 18023 RVA: 0x0014B9C5 File Offset: 0x00149BC5
			// (set) Token: 0x06004668 RID: 18024 RVA: 0x0014B9CD File Offset: 0x00149BCD
			[SaveableProperty(4)]
			public float Progress { get; private set; }

			// Token: 0x17000DE1 RID: 3553
			// (get) Token: 0x06004669 RID: 18025 RVA: 0x0014B9D6 File Offset: 0x00149BD6
			// (set) Token: 0x0600466A RID: 18026 RVA: 0x0014B9DE File Offset: 0x00149BDE
			[SaveableProperty(5)]
			public SiegeEvent.RangedSiegeEngine RangedSiegeEngine { get; private set; }

			// Token: 0x17000DE2 RID: 3554
			// (get) Token: 0x0600466B RID: 18027 RVA: 0x0014B9E7 File Offset: 0x00149BE7
			// (set) Token: 0x0600466C RID: 18028 RVA: 0x0014B9EF File Offset: 0x00149BEF
			[SaveableProperty(6)]
			public float RedeploymentProgress { get; private set; }

			// Token: 0x17000DE3 RID: 3555
			// (get) Token: 0x0600466D RID: 18029 RVA: 0x0014B9F8 File Offset: 0x00149BF8
			// (set) Token: 0x0600466E RID: 18030 RVA: 0x0014BA00 File Offset: 0x00149C00
			[SaveableProperty(7)]
			public float MaxHitPoints { get; private set; }

			// Token: 0x17000DE4 RID: 3556
			// (get) Token: 0x0600466F RID: 18031 RVA: 0x0014BA09 File Offset: 0x00149C09
			public bool IsConstructed
			{
				get
				{
					return this.Progress >= 1f;
				}
			}

			// Token: 0x17000DE5 RID: 3557
			// (get) Token: 0x06004670 RID: 18032 RVA: 0x0014BA1B File Offset: 0x00149C1B
			public bool IsBeingRedeployed
			{
				get
				{
					return this.RedeploymentProgress < 1f;
				}
			}

			// Token: 0x06004671 RID: 18033 RVA: 0x0014BA2A File Offset: 0x00149C2A
			public SiegeEngineConstructionProgress(SiegeEngineType siegeEngine, float progress, float maxHitPoints)
			{
				this.SiegeEngine = siegeEngine;
				this.Progress = progress;
				this.RedeploymentProgress = 1f;
				this.RangedSiegeEngine = null;
				this.MaxHitPoints = maxHitPoints;
				this.Hitpoints = this.MaxHitPoints;
			}

			// Token: 0x06004672 RID: 18034 RVA: 0x0014BA65 File Offset: 0x00149C65
			public void SetRedeploymentProgress(float redeploymentProgress)
			{
				this.RedeploymentProgress = redeploymentProgress;
			}

			// Token: 0x06004673 RID: 18035 RVA: 0x0014BA6E File Offset: 0x00149C6E
			public void SetHitpoints(float hitPoints)
			{
				this.Hitpoints = hitPoints;
			}

			// Token: 0x06004674 RID: 18036 RVA: 0x0014BA77 File Offset: 0x00149C77
			public void SetProgress(float progress)
			{
				this.Progress = progress;
			}

			// Token: 0x06004675 RID: 18037 RVA: 0x0014BA80 File Offset: 0x00149C80
			public void SetRangedSiegeEngine(SiegeEvent.RangedSiegeEngine rangedSiegeEngine)
			{
				this.RangedSiegeEngine = rangedSiegeEngine;
			}

			// Token: 0x0400175C RID: 5980
			[SaveableField(1)]
			public readonly SiegeEngineType SiegeEngine;
		}

		// Token: 0x0200059B RID: 1435
		public class SiegeEnginesContainer
		{
			// Token: 0x06004676 RID: 18038 RVA: 0x0014BA89 File Offset: 0x00149C89
			internal static void AutoGeneratedStaticCollectObjectsSiegeEnginesContainer(object o, List<object> collectedObjects)
			{
				((SiegeEvent.SiegeEnginesContainer)o).AutoGeneratedInstanceCollectObjects(collectedObjects);
			}

			// Token: 0x06004677 RID: 18039 RVA: 0x0014BA98 File Offset: 0x00149C98
			protected virtual void AutoGeneratedInstanceCollectObjects(List<object> collectedObjects)
			{
				collectedObjects.Add(this.SiegePreparations);
				collectedObjects.Add(this.DeployedRangedSiegeEngines);
				collectedObjects.Add(this.DeployedMeleeSiegeEngines);
				collectedObjects.Add(this._deployedSiegeEngines);
				collectedObjects.Add(this._reservedSiegeEngines);
				collectedObjects.Add(this._deployedSiegeEngineTypesCount);
				collectedObjects.Add(this._reservedSiegeEngineTypesCount);
				collectedObjects.Add(this._removedSiegeEngines);
			}

			// Token: 0x06004678 RID: 18040 RVA: 0x0014BB05 File Offset: 0x00149D05
			internal static object AutoGeneratedGetMemberValueSiegePreparations(object o)
			{
				return ((SiegeEvent.SiegeEnginesContainer)o).SiegePreparations;
			}

			// Token: 0x06004679 RID: 18041 RVA: 0x0014BB12 File Offset: 0x00149D12
			internal static object AutoGeneratedGetMemberValueDeployedRangedSiegeEngines(object o)
			{
				return ((SiegeEvent.SiegeEnginesContainer)o).DeployedRangedSiegeEngines;
			}

			// Token: 0x0600467A RID: 18042 RVA: 0x0014BB1F File Offset: 0x00149D1F
			internal static object AutoGeneratedGetMemberValueDeployedMeleeSiegeEngines(object o)
			{
				return ((SiegeEvent.SiegeEnginesContainer)o).DeployedMeleeSiegeEngines;
			}

			// Token: 0x0600467B RID: 18043 RVA: 0x0014BB2C File Offset: 0x00149D2C
			internal static object AutoGeneratedGetMemberValue_deployedSiegeEngines(object o)
			{
				return ((SiegeEvent.SiegeEnginesContainer)o)._deployedSiegeEngines;
			}

			// Token: 0x0600467C RID: 18044 RVA: 0x0014BB39 File Offset: 0x00149D39
			internal static object AutoGeneratedGetMemberValue_reservedSiegeEngines(object o)
			{
				return ((SiegeEvent.SiegeEnginesContainer)o)._reservedSiegeEngines;
			}

			// Token: 0x0600467D RID: 18045 RVA: 0x0014BB46 File Offset: 0x00149D46
			internal static object AutoGeneratedGetMemberValue_deployedSiegeEngineTypesCount(object o)
			{
				return ((SiegeEvent.SiegeEnginesContainer)o)._deployedSiegeEngineTypesCount;
			}

			// Token: 0x0600467E RID: 18046 RVA: 0x0014BB53 File Offset: 0x00149D53
			internal static object AutoGeneratedGetMemberValue_reservedSiegeEngineTypesCount(object o)
			{
				return ((SiegeEvent.SiegeEnginesContainer)o)._reservedSiegeEngineTypesCount;
			}

			// Token: 0x0600467F RID: 18047 RVA: 0x0014BB60 File Offset: 0x00149D60
			internal static object AutoGeneratedGetMemberValue_removedSiegeEngines(object o)
			{
				return ((SiegeEvent.SiegeEnginesContainer)o)._removedSiegeEngines;
			}

			// Token: 0x17000DE6 RID: 3558
			// (get) Token: 0x06004680 RID: 18048 RVA: 0x0014BB6D File Offset: 0x00149D6D
			public MBReadOnlyList<SiegeEvent.SiegeEngineConstructionProgress> DeployedSiegeEngines
			{
				get
				{
					return this._deployedSiegeEngines;
				}
			}

			// Token: 0x17000DE7 RID: 3559
			// (get) Token: 0x06004681 RID: 18049 RVA: 0x0014BB75 File Offset: 0x00149D75
			public MBReadOnlyList<SiegeEvent.SiegeEngineConstructionProgress> ReservedSiegeEngines
			{
				get
				{
					return this._reservedSiegeEngines;
				}
			}

			// Token: 0x17000DE8 RID: 3560
			// (get) Token: 0x06004682 RID: 18050 RVA: 0x0014BB7D File Offset: 0x00149D7D
			// (set) Token: 0x06004683 RID: 18051 RVA: 0x0014BB85 File Offset: 0x00149D85
			public MBReadOnlyDictionary<SiegeEngineType, int> DeployedSiegeEngineTypesCount { get; private set; }

			// Token: 0x17000DE9 RID: 3561
			// (get) Token: 0x06004684 RID: 18052 RVA: 0x0014BB8E File Offset: 0x00149D8E
			// (set) Token: 0x06004685 RID: 18053 RVA: 0x0014BB96 File Offset: 0x00149D96
			public MBReadOnlyDictionary<SiegeEngineType, int> ReservedSiegeEngineTypesCount { get; private set; }

			// Token: 0x17000DEA RID: 3562
			// (get) Token: 0x06004686 RID: 18054 RVA: 0x0014BB9F File Offset: 0x00149D9F
			public MBReadOnlyList<SiegeEvent.SiegeEnginesContainer.RemovedSiegeEngine> RemovedSiegeEngines
			{
				get
				{
					return this._removedSiegeEngines;
				}
			}

			// Token: 0x06004687 RID: 18055 RVA: 0x0014BBA7 File Offset: 0x00149DA7
			[LoadInitializationCallback]
			private void OnLoad(MetaData metaData)
			{
				this.DeployedSiegeEngineTypesCount = new MBReadOnlyDictionary<SiegeEngineType, int>(this._deployedSiegeEngineTypesCount);
				this.ReservedSiegeEngineTypesCount = new MBReadOnlyDictionary<SiegeEngineType, int>(this._reservedSiegeEngineTypesCount);
				this.RefreshDeployedCounts();
				this.RefreshReservedCounts();
			}

			// Token: 0x06004688 RID: 18056 RVA: 0x0014BBD7 File Offset: 0x00149DD7
			public IEnumerable<SiegeEvent.SiegeEngineConstructionProgress> AllSiegeEngines()
			{
				if (this.SiegePreparations != null)
				{
					yield return this.SiegePreparations;
				}
				foreach (SiegeEvent.SiegeEngineConstructionProgress siegeEngineConstructionProgress in this._deployedSiegeEngines)
				{
					yield return siegeEngineConstructionProgress;
				}
				List<SiegeEvent.SiegeEngineConstructionProgress>.Enumerator enumerator = default(List<SiegeEvent.SiegeEngineConstructionProgress>.Enumerator);
				foreach (SiegeEvent.SiegeEngineConstructionProgress siegeEngineConstructionProgress2 in this._reservedSiegeEngines)
				{
					yield return siegeEngineConstructionProgress2;
				}
				enumerator = default(List<SiegeEvent.SiegeEngineConstructionProgress>.Enumerator);
				yield break;
				yield break;
			}

			// Token: 0x06004689 RID: 18057 RVA: 0x0014BBE8 File Offset: 0x00149DE8
			public SiegeEnginesContainer(BattleSideEnum side, SiegeEvent.SiegeEngineConstructionProgress siegePreparations)
			{
				this.SiegePreparations = siegePreparations;
				if (side != BattleSideEnum.Defender)
				{
					if (side == BattleSideEnum.Attacker)
					{
						this._deployedSiegeEngines = new MBList<SiegeEvent.SiegeEngineConstructionProgress>(4);
						this.DeployedRangedSiegeEngines = new SiegeEvent.SiegeEngineConstructionProgress[4];
						this.DeployedMeleeSiegeEngines = new SiegeEvent.SiegeEngineConstructionProgress[3];
					}
					else
					{
						Debug.FailedAssert("Invalid side", "C:\\Develop\\MB3\\Source\\Bannerlord\\TaleWorlds.CampaignSystem\\Siege\\SiegeEvent.cs", ".ctor", 254);
					}
				}
				else
				{
					this._deployedSiegeEngines = new MBList<SiegeEvent.SiegeEngineConstructionProgress>(4);
					this.DeployedRangedSiegeEngines = new SiegeEvent.SiegeEngineConstructionProgress[4];
					this.DeployedMeleeSiegeEngines = new SiegeEvent.SiegeEngineConstructionProgress[0];
				}
				this._deployedSiegeEngineTypesCount = new Dictionary<SiegeEngineType, int>();
				this.DeployedSiegeEngineTypesCount = new MBReadOnlyDictionary<SiegeEngineType, int>(this._deployedSiegeEngineTypesCount);
				this._reservedSiegeEngines = new MBList<SiegeEvent.SiegeEngineConstructionProgress>();
				this._reservedSiegeEngineTypesCount = new Dictionary<SiegeEngineType, int>();
				this.ReservedSiegeEngineTypesCount = new MBReadOnlyDictionary<SiegeEngineType, int>(this._reservedSiegeEngineTypesCount);
				this._removedSiegeEngines = new MBList<SiegeEvent.SiegeEnginesContainer.RemovedSiegeEngine>();
			}

			// Token: 0x0600468A RID: 18058 RVA: 0x0014BCBC File Offset: 0x00149EBC
			public void AddPrebuiltEngineToReserve(SiegeEvent.SiegeEngineConstructionProgress siegeEngine)
			{
				this._reservedSiegeEngines.Add(siegeEngine);
				siegeEngine.SetProgress(1f);
				siegeEngine.SetRedeploymentProgress(0f);
				this.RefreshReservedCounts();
			}

			// Token: 0x0600468B RID: 18059 RVA: 0x0014BCE8 File Offset: 0x00149EE8
			public void DeploySiegeEngineAtIndex(SiegeEvent.SiegeEngineConstructionProgress siegeEngine, int index)
			{
				SiegeEvent.SiegeEngineConstructionProgress[] array = siegeEngine.SiegeEngine.IsRanged ? this.DeployedRangedSiegeEngines : this.DeployedMeleeSiegeEngines;
				SiegeEvent.SiegeEngineConstructionProgress siegeEngineConstructionProgress = array[index];
				if (siegeEngineConstructionProgress != null)
				{
					this._deployedSiegeEngines.Remove(siegeEngineConstructionProgress);
					this._reservedSiegeEngines.Add(siegeEngineConstructionProgress);
					siegeEngineConstructionProgress.SetRedeploymentProgress(0f);
				}
				this._reservedSiegeEngines.Remove(siegeEngine);
				this.RefreshReservedCounts();
				array[index] = siegeEngine;
				this._deployedSiegeEngines.Add(siegeEngine);
				this.RefreshDeployedCounts();
			}

			// Token: 0x0600468C RID: 18060 RVA: 0x0014BD64 File Offset: 0x00149F64
			public void RemoveDeployedSiegeEngine(int index, bool isRanged, bool moveToReserve)
			{
				SiegeEvent.SiegeEngineConstructionProgress[] array = isRanged ? this.DeployedRangedSiegeEngines : this.DeployedMeleeSiegeEngines;
				SiegeEvent.SiegeEngineConstructionProgress siegeEngineConstructionProgress = array[index];
				if (siegeEngineConstructionProgress != null)
				{
					if (moveToReserve)
					{
						this._reservedSiegeEngines.Add(siegeEngineConstructionProgress);
						this.RefreshReservedCounts();
						siegeEngineConstructionProgress.SetRedeploymentProgress(0f);
					}
					this._deployedSiegeEngines.Remove(siegeEngineConstructionProgress);
					this.RefreshDeployedCounts();
					array[index] = null;
				}
			}

			// Token: 0x0600468D RID: 18061 RVA: 0x0014BDC1 File Offset: 0x00149FC1
			public bool RemovedSiegeEngineFromReservedSiegeEngines(SiegeEvent.SiegeEngineConstructionProgress siegeEngine)
			{
				bool flag = this._reservedSiegeEngines.Remove(siegeEngine);
				if (flag)
				{
					this.RefreshReservedCounts();
				}
				return flag;
			}

			// Token: 0x0600468E RID: 18062 RVA: 0x0014BDD8 File Offset: 0x00149FD8
			public int FindDeploymentIndexOfDeployedEngine(SiegeEvent.SiegeEngineConstructionProgress deployedEngine)
			{
				if (deployedEngine.SiegeEngine.IsRanged)
				{
					return this.DeployedRangedSiegeEngines.FindIndex((SiegeEvent.SiegeEngineConstructionProgress engine) => engine == deployedEngine);
				}
				return this.DeployedMeleeSiegeEngines.FindIndex((SiegeEvent.SiegeEngineConstructionProgress engine) => engine == deployedEngine);
			}

			// Token: 0x0600468F RID: 18063 RVA: 0x0014BE33 File Offset: 0x0014A033
			public bool ClearRemovedEnginesIfNecessary()
			{
				return this._removedSiegeEngines.RemoveAll((SiegeEvent.SiegeEnginesContainer.RemovedSiegeEngine engine) => !engine.RemovalTime.IsFuture) > 0;
			}

			// Token: 0x06004690 RID: 18064 RVA: 0x0014BE64 File Offset: 0x0014A064
			private void RefreshDeployedCounts()
			{
				this._deployedSiegeEngineTypesCount.Clear();
				foreach (SiegeEvent.SiegeEngineConstructionProgress siegeEngineConstructionProgress in this.DeployedSiegeEngines)
				{
					SiegeEngineType siegeEngine = siegeEngineConstructionProgress.SiegeEngine;
					int num;
					if (this._deployedSiegeEngineTypesCount.TryGetValue(siegeEngine, out num))
					{
						this._deployedSiegeEngineTypesCount[siegeEngine] = num + 1;
					}
					else
					{
						this._deployedSiegeEngineTypesCount.Add(siegeEngine, 1);
					}
				}
			}

			// Token: 0x06004691 RID: 18065 RVA: 0x0014BEF0 File Offset: 0x0014A0F0
			private void RefreshReservedCounts()
			{
				this._reservedSiegeEngineTypesCount.Clear();
				foreach (SiegeEvent.SiegeEngineConstructionProgress siegeEngineConstructionProgress in this.ReservedSiegeEngines)
				{
					SiegeEngineType siegeEngine = siegeEngineConstructionProgress.SiegeEngine;
					int num;
					if (this._reservedSiegeEngineTypesCount.TryGetValue(siegeEngine, out num))
					{
						this._reservedSiegeEngineTypesCount[siegeEngine] = num + 1;
					}
					else
					{
						this._reservedSiegeEngineTypesCount.Add(siegeEngine, 1);
					}
				}
			}

			// Token: 0x04001762 RID: 5986
			public const int MaximumAttackerMeleeSiegeEngineCount = 3;

			// Token: 0x04001763 RID: 5987
			public const int MaximumAttackerRangedSiegeEngineCount = 4;

			// Token: 0x04001764 RID: 5988
			public const int MaximumDefenderMeleeSiegeEngineCount = 0;

			// Token: 0x04001765 RID: 5989
			public const int MaximumDefenderRangedSiegeEngineCount = 4;

			// Token: 0x04001766 RID: 5990
			[SaveableField(1)]
			public readonly SiegeEvent.SiegeEngineConstructionProgress SiegePreparations;

			// Token: 0x04001767 RID: 5991
			[SaveableField(2)]
			private readonly MBList<SiegeEvent.SiegeEngineConstructionProgress> _deployedSiegeEngines;

			// Token: 0x04001768 RID: 5992
			[SaveableField(3)]
			private readonly MBList<SiegeEvent.SiegeEngineConstructionProgress> _reservedSiegeEngines;

			// Token: 0x04001769 RID: 5993
			[SaveableField(4)]
			public readonly SiegeEvent.SiegeEngineConstructionProgress[] DeployedRangedSiegeEngines;

			// Token: 0x0400176A RID: 5994
			[SaveableField(5)]
			public readonly SiegeEvent.SiegeEngineConstructionProgress[] DeployedMeleeSiegeEngines;

			// Token: 0x0400176C RID: 5996
			[SaveableField(6)]
			private readonly Dictionary<SiegeEngineType, int> _deployedSiegeEngineTypesCount;

			// Token: 0x0400176E RID: 5998
			[SaveableField(7)]
			private readonly Dictionary<SiegeEngineType, int> _reservedSiegeEngineTypesCount;

			// Token: 0x0400176F RID: 5999
			[SaveableField(8)]
			private readonly MBList<SiegeEvent.SiegeEnginesContainer.RemovedSiegeEngine> _removedSiegeEngines;

			// Token: 0x02000797 RID: 1943
			public class RemovedSiegeEngine
			{
				// Token: 0x06005A54 RID: 23124 RVA: 0x00185179 File Offset: 0x00183379
				internal static void AutoGeneratedStaticCollectObjectsRemovedSiegeEngine(object o, List<object> collectedObjects)
				{
					((SiegeEvent.SiegeEnginesContainer.RemovedSiegeEngine)o).AutoGeneratedInstanceCollectObjects(collectedObjects);
				}

				// Token: 0x06005A55 RID: 23125 RVA: 0x00185187 File Offset: 0x00183387
				protected virtual void AutoGeneratedInstanceCollectObjects(List<object> collectedObjects)
				{
					collectedObjects.Add(this.SiegeEngine);
					CampaignTime.AutoGeneratedStaticCollectObjectsCampaignTime(this.RemovalTime, collectedObjects);
				}

				// Token: 0x06005A56 RID: 23126 RVA: 0x001851A6 File Offset: 0x001833A6
				internal static object AutoGeneratedGetMemberValueSiegeEngine(object o)
				{
					return ((SiegeEvent.SiegeEnginesContainer.RemovedSiegeEngine)o).SiegeEngine;
				}

				// Token: 0x06005A57 RID: 23127 RVA: 0x001851B3 File Offset: 0x001833B3
				internal static object AutoGeneratedGetMemberValueRemovalTime(object o)
				{
					return ((SiegeEvent.SiegeEnginesContainer.RemovedSiegeEngine)o).RemovalTime;
				}

				// Token: 0x06005A58 RID: 23128 RVA: 0x001851C5 File Offset: 0x001833C5
				internal static object AutoGeneratedGetMemberValueSlotIndex(object o)
				{
					return ((SiegeEvent.SiegeEnginesContainer.RemovedSiegeEngine)o).SlotIndex;
				}

				// Token: 0x06005A59 RID: 23129 RVA: 0x001851D7 File Offset: 0x001833D7
				public RemovedSiegeEngine(SiegeEvent.SiegeEngineConstructionProgress siegeEngine, CampaignTime removalTime, int slotIndex)
				{
					this.SiegeEngine = siegeEngine;
					this.RemovalTime = removalTime;
					this.SlotIndex = slotIndex;
				}

				// Token: 0x04001F7B RID: 8059
				[SaveableField(1)]
				public readonly SiegeEvent.SiegeEngineConstructionProgress SiegeEngine;

				// Token: 0x04001F7C RID: 8060
				[SaveableField(2)]
				public readonly CampaignTime RemovalTime;

				// Token: 0x04001F7D RID: 8061
				[SaveableField(3)]
				public readonly int SlotIndex;
			}
		}

		// Token: 0x0200059C RID: 1436
		public class SiegeEngineMissile
		{
			// Token: 0x06004692 RID: 18066 RVA: 0x0014BF7C File Offset: 0x0014A17C
			internal static void AutoGeneratedStaticCollectObjectsSiegeEngineMissile(object o, List<object> collectedObjects)
			{
				((SiegeEvent.SiegeEngineMissile)o).AutoGeneratedInstanceCollectObjects(collectedObjects);
			}

			// Token: 0x06004693 RID: 18067 RVA: 0x0014BF8A File Offset: 0x0014A18A
			protected virtual void AutoGeneratedInstanceCollectObjects(List<object> collectedObjects)
			{
				collectedObjects.Add(this.ShooterSiegeEngineType);
				collectedObjects.Add(this.TargetSiegeEngine);
				CampaignTime.AutoGeneratedStaticCollectObjectsCampaignTime(this.CollisionTime, collectedObjects);
				CampaignTime.AutoGeneratedStaticCollectObjectsCampaignTime(this.FireDecisionTime, collectedObjects);
			}

			// Token: 0x06004694 RID: 18068 RVA: 0x0014BFC6 File Offset: 0x0014A1C6
			internal static object AutoGeneratedGetMemberValueShooterSiegeEngineType(object o)
			{
				return ((SiegeEvent.SiegeEngineMissile)o).ShooterSiegeEngineType;
			}

			// Token: 0x06004695 RID: 18069 RVA: 0x0014BFD3 File Offset: 0x0014A1D3
			internal static object AutoGeneratedGetMemberValueShooterSlotIndex(object o)
			{
				return ((SiegeEvent.SiegeEngineMissile)o).ShooterSlotIndex;
			}

			// Token: 0x06004696 RID: 18070 RVA: 0x0014BFE5 File Offset: 0x0014A1E5
			internal static object AutoGeneratedGetMemberValueTargetType(object o)
			{
				return ((SiegeEvent.SiegeEngineMissile)o).TargetType;
			}

			// Token: 0x06004697 RID: 18071 RVA: 0x0014BFF7 File Offset: 0x0014A1F7
			internal static object AutoGeneratedGetMemberValueTargetSlotIndex(object o)
			{
				return ((SiegeEvent.SiegeEngineMissile)o).TargetSlotIndex;
			}

			// Token: 0x06004698 RID: 18072 RVA: 0x0014C009 File Offset: 0x0014A209
			internal static object AutoGeneratedGetMemberValueTargetSiegeEngine(object o)
			{
				return ((SiegeEvent.SiegeEngineMissile)o).TargetSiegeEngine;
			}

			// Token: 0x06004699 RID: 18073 RVA: 0x0014C016 File Offset: 0x0014A216
			internal static object AutoGeneratedGetMemberValueHitSuccessful(object o)
			{
				return ((SiegeEvent.SiegeEngineMissile)o).HitSuccessful;
			}

			// Token: 0x0600469A RID: 18074 RVA: 0x0014C028 File Offset: 0x0014A228
			internal static object AutoGeneratedGetMemberValueCollisionTime(object o)
			{
				return ((SiegeEvent.SiegeEngineMissile)o).CollisionTime;
			}

			// Token: 0x0600469B RID: 18075 RVA: 0x0014C03A File Offset: 0x0014A23A
			internal static object AutoGeneratedGetMemberValueFireDecisionTime(object o)
			{
				return ((SiegeEvent.SiegeEngineMissile)o).FireDecisionTime;
			}

			// Token: 0x0600469C RID: 18076 RVA: 0x0014C04C File Offset: 0x0014A24C
			public SiegeEngineMissile(SiegeEngineType shooterSiegeEngineType, int shooterSlotIndex, SiegeBombardTargets targetType, int targetSlotIndex, SiegeEvent.SiegeEngineConstructionProgress targetSiegeEngine, CampaignTime collisionTime, CampaignTime fireTime, bool hitSuccessful)
			{
				this.ShooterSiegeEngineType = shooterSiegeEngineType;
				this.ShooterSlotIndex = shooterSlotIndex;
				this.TargetType = targetType;
				this.TargetSlotIndex = targetSlotIndex;
				this.TargetSiegeEngine = targetSiegeEngine;
				this.CollisionTime = collisionTime;
				this.FireDecisionTime = fireTime;
				this.HitSuccessful = hitSuccessful;
			}

			// Token: 0x04001770 RID: 6000
			[SaveableField(1)]
			public readonly SiegeEngineType ShooterSiegeEngineType;

			// Token: 0x04001771 RID: 6001
			[SaveableField(2)]
			public readonly int ShooterSlotIndex;

			// Token: 0x04001772 RID: 6002
			[SaveableField(3)]
			public readonly SiegeBombardTargets TargetType;

			// Token: 0x04001773 RID: 6003
			[SaveableField(4)]
			public readonly int TargetSlotIndex;

			// Token: 0x04001774 RID: 6004
			[SaveableField(5)]
			public readonly SiegeEvent.SiegeEngineConstructionProgress TargetSiegeEngine;

			// Token: 0x04001775 RID: 6005
			[SaveableField(6)]
			public readonly bool HitSuccessful;

			// Token: 0x04001776 RID: 6006
			[SaveableField(7)]
			public readonly CampaignTime CollisionTime;

			// Token: 0x04001777 RID: 6007
			[SaveableField(8)]
			public readonly CampaignTime FireDecisionTime;
		}
	}
}
